{% include "base.html" %}
{% block content %}
		<form method="post" action="." >
			<table>
			{{ form }}
			{{ form.lines }}
			
			 {% if formset %}
			</table>
				
				{{ formset.non_form_errors }}
				<table id="formset" class="form">
				{{ formset.management_form }}
				{% for form in formset.forms %}
				  {% if forloop.first %}
				  <thead><tr>
				    {% for field in form.visible_fields %}
				    <th>{{ field.label|capfirst }}</th>
				    {% endfor %}
				  </tr></thead>
				  {% endif %}
				  <tr class="{% cycle row1,row2 %}">
				  {% for field in form.visible_fields %}
				    <td>
				    {# Include the hidden fields in the form #}
				    {% if forloop.first %}
				      {% for hidden in form.hidden_fields %}
				      {{ hidden }}
				      {% endfor %}
				    {% endif %}
				      {{ field.errors.as_ul }}
				      {{ field }}
				    </td>
				  {% endfor %}
				  </tr>
				 {% endfor %}
				{% endif %}
			</table>
			<input type="submit" value="Submit" />
		</form>
{% endblock %}
